import java.util.Scanner;

/** 
   This program reads a student's final class average,
   and prints out the appropriate letter grade.
*/
public class DoGrades
{
   public static void main(String[] args)
   {
      // Print prompt to enter a final class average 
      System.out.print("Enter final class average: ");

      // Read in final class average
      Scanner in = new Scanner(System.in);
      double average = in.nextDouble();

      String finalGrade;

      // Determine and print final grade
       if(average > 90.0 && average <= 100.0){
         finalGrade = String.valueOf('A');
      }
      else if(average > 80.0){
         finalGrade = String.valueOf('B');
      }
      else if(average > 70.0){
         finalGrade = String.valueOf('C');
      }
      else if(average > 60.0){
         finalGrade = String.valueOf('D');
      }
      else {
         finalGrade = String.valueOf('F');
      }
     
      // Your work here



      System.out.println(finalGrade);
   }
}